from twisted.internet import reactor
import time

def printTime():
	print "Current time is", time.strftime("%H:%M:%S")

def stopReactor():
	print "Stopping reactor"
	reactor.stop()

reactor.callLater(1, printTime)
reactor.callLater(1, printTime)
reactor.callLater(3, printTime)
reactor.callLater(9, printTime)
reactor.callLater(10, stopReactor)

print "running the reactor...."

reactor.run()

print "reactor stopped"